import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/wareStockExist/addOrSave',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/wareStockExist/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/wareStockExist/addOrSave',
    method: 'post',
    data
  })
}

export function exportDe(data) {
  return request({
    url: 'api/wareStockExist/export',
    method: 'post',
    data
  })
}

export function importDe(data) {
  return request({
    url: 'api/wareStockExist/import',
    method: 'post',
    data
  })
}
// 获取库存记录待发量记录信息
export function getWareStockExistWaitSendNumDetailInfo(data) {
  return request({
    url: 'api/wareStockExist/getWareStockExistWaitSendNumDetailInfo',
    method: 'get',
    params: data
  })
}
// 获取库存记录在途量记录信息
export function getWareStockExistOnWayNumDetailInfo(data) {
  return request({
    url: 'api/wareStockExist/getWareStockExistOnWayNumDetailInfo',
    method: 'get',
    params: data
  })
}
// 获取库存记录加锁可用量记录信息
export function getWareStockExistLockUsableNumDetailInfo(data) {
  return request({
    url: 'api/wareStockExist/getWareStockExistLockUsableNumDetailInfo',
    method: 'get',
    params: data
  })
}
// 获取库存记录拣货量记录信息
export function getWareStockExistPickNumDetailInfo(data) {
  return request({
    url: 'api/wareStockExist/getWareStockExistPickNumDetailInfo',
    method: 'get',
    params: data
  })
}
// 获取库存记录调拨待发量记录信息
export function getWareStockExistAllotOutNumDetailInfo(data) {
  return request({
    url: 'api/wareStockExist/getWareStockExistAllotOutNumDetailInfo',
    method: 'get',
    params: data
  })
}
// 获取配送在途信息
export function getLoadOnWayInfo(data) {
  return request({
    url: 'api/wareStockExist/loadOnWayInfo',
    method: 'get',
    params: data
  })
}
// 库存记录调整库存
export function adjust(data) {
  return request({
    url: '/api/wareStockExist/adjustStock',
    method: 'post',
    data
  })
}
//调整库存成本
export function wareStockUpdateCostPrice(data) {
  return request({
    url: '/api/wareStockUpdateCostPrice/add',
    method: 'post',
    data
  })
}
//库存成本修改记录
export function getWareStockUpdateCostPrice(params){
  return request({
    url: '/api/wareStockUpdateCostPrice/queryAll',
    method: 'get',
    params
  })
}

export default { add, edit, exportDe, importDe, del, adjust }
